import Vue from 'vue'
import Router from 'vue-router'
import Commons from '@/views/common.vue'
import ToSign from '@/views/toSign.vue'
import Sign from '@/views/sign.vue'
import WorkIndex from '@/views/work/workIndex.vue'
import WorkCard from '@/views/work/workCard.vue'
import Login from '@/views/login.vue'
import Sufferer from '@/views/work/sufferer.vue'
import SufferList from '@/views/work/sufferList.vue'
import PrescribingDrugs from '@/views/prescribing/prescribingDrugs.vue'
import Inquiry from '@/views/inquiry/Inquiry.vue'
import MySend from '@/views/inquiry/mySend.vue'
import SetUp from '@/views/setUp/setUp.vue'
import Search from '@/views/work/search.vue'
import Students from '@/views/student/students.vue'
import StudentCourse from '@/views/student/studentCourse.vue'
import StudentScore from '@/views/student/studentScore.vue'
import ToStudentScore from '@/views/student/toStudentScore.vue'
import StudentEndScore from '@/views/student/studentEndScore.vue'
import Lecturers from '@/views/lecturer/lecturers.vue'
import LecturersAdvice from '@/views/lecturer/lecturersAdvice.vue'
import LecturersLevel from '@/views/lecturer/lecturersLevel.vue'
import LecturersCourse from '@/views/lecturer/LecturersCourse.vue'
import LecturersCourseDetail from '@/views/lecturer/lecturersCourseDetail.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Commons',
      meta: {
        title: '选择课程'
      },
      component: Commons
    },
    {
      path: '/toSign',
      name: 'ToSign',
      meta: {
        title: '去签到'
      },
      component: ToSign
    },
    {
      path: '/sufferer',
      name: 'Sufferer',
      meta: {
        title: '患者'
      },
      component: Sufferer
    },
    {
      path: '/sufferList',
      name: 'SufferList',
      meta: {
        title: '患者列表'
      },
      component: SufferList
    },
    {
      path: '/prescribingDrugs',
      name: 'PrescribingDrugs',
      meta: {
        title: '开方购药'
      },
      component: PrescribingDrugs
    },
    {
      path: '/setUp',
      name: 'SetUp',
      meta: {
        title: '公告及设置'
      },
      component: SetUp
    },
    {
      path: '/sign',
      name: 'Sign',
      meta: {
        title: '签到'
      },
      component: Sign
    },
    {
      path: '/workIndex',
      name: 'WorkIndex',
      meta: {
        title: '工作室'
      },
      component: WorkIndex
    },
    {
      path: '/login',
      name: 'Login',
      meta: {
        title: '登录'
      },
      component: Login
    },
    {
      path: '/workCard',
      name: 'WorkCard',
      meta: {
        title: '工作室名片'
      },
      component: WorkCard
    },
    {
      path: '/inquiry',
      name: 'Inquiry',
      meta: {
        title: '问诊单'
      },
      component: Inquiry
    },
    {
      path: '/mySend',
      name: 'MySend',
      meta: {
        title: '我发出的'
      },
      component: MySend
    },
    {
      path: '/search',
      name: 'Search',
      meta: {
        title: '搜索'
      },
      component: Search
    },
    {
      path: '/student',
      name: 'Students',
      meta: {
        title: '我是学员'
      },
      component: Students
    },
    {
      path: '/studentCourse',
      name: 'StudentCourse',
      meta: {
        title: '课程详情'
      },
      component: StudentCourse
    },
    {
      path: '/toStudentScore',
      name: 'ToStudentScore',
      meta: {
        title: '去评价'
      },
      component: ToStudentScore
    },
    {
      path: '/studentScore',
      name: 'StudentScore',
      meta: {
        title: '课程评分'
      },
      component: StudentScore
    },
    {
      path: '/studentEndScore',
      name: 'StudentEndScore',
      meta: {
        title: '课程评分'
      },
      component: StudentEndScore
    },
    {
      path: '/lecturer',
      name: 'Lecturers',
      meta: {
        title: '我是讲师'
      },
      component: Lecturers
    },
    {
      path: '/lecturerAdvice',
      name: 'LecturersAdvice',
      meta: {
        title: '讲师建议'
      },
      component: LecturersAdvice
    },
    {
      path: '/lecturerLevel',
      name: 'LecturersLevel',
      meta: {
        title: '晋升申请'
      },
      component: LecturersLevel
    },
    {
      path: '/lecturerCourse',
      name: 'LecturersCourse',
      meta: {
        title: '课程列表'
      },
      component: LecturersCourse
    },
    {
      path: '/lecturerCourseDetail',
      name: 'LecturersCourseDetail',
      meta: {
        title: '课程'
      },
      component: LecturersCourseDetail
    }
  ]
})

Vue.use(require('vue-wechat-title'))
